<admintpl file="header" />
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a>用户管理</a></li>
	</ul>
	<form class="well form-search" method="post" action="{:U('Staff/index')}">
		用户ID：
		<input type="text" name="uid" style="width: 100px;" value="{:I('request.uid')}" placeholder="请输入用户ID">
		关键字：
		<input type="text" name="keyword" style="width: 200px;" value="{:I('request.keyword')}" placeholder="用户名">
		<input type="submit" class="btn btn-primary" value="搜索" />
		<a class="btn btn-danger" href="{:U('Staff/index')}">清空</a>
	</form>
	<form method="post" class="js-ajax-form">
		<table class="table table-hover table-bordered">
			<thead>
			<tr>
				<th align="center">ID</th>
				<th>用户名</th>
				<th>昵称</th>
				<th>头像</th>
				<th>注册时间</th>
				<th>最后登录IP</th>
				<th>用户身份</th>
				<th>状态</th>
				<th align="center">操作</th>
			</tr>
			</thead>
			<tbody>
			<php>
				$user_statuses=array("0"=>'已拉黑',"1"=>'正常',"2"=>'未验证');
				$user_type = array("0"=>'普通员工',"1"=>'优质咨询师',"2"=>'VIP咨询师','3'=>'超级VIP咨询师');
			</php>
			<foreach name="users" item="vo">
				<tr>
					<td align="center">{$vo.id}</td>
					<td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:'第三方用户')}</td>
					<td>{$vo['user_nicename']?$vo['user_nicename']:'未填写'}</td>
					<td><img width="25" height="25" src=http://{$vo.avatar} onerror="this.src='https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1494306610620&di=13c2c8be93a3a8b198bc060d69c9320f&imgtype=0&src=http%3A%2F%2Fwww.youlanw.com%2Fstatic%2Fimages%2Fman.jpg'"/></td>
					<!--<td><img width="25" height="25" src="{:U('Staff/avatar',array('id'=>$vo['id']))}" /></td>-->
					<td>{$vo.create_time|date='Y-m-d H:i',###}</td>
					<td>{$vo.last_login_ip}</td>
					<td>{$user_type[$vo[job_class]]}</td>
					<td>{$user_statuses[$vo['user_status']]}</td>
					<td align="center">
						<neq name="vo.id" value="1">
							<a href="{:U('Staff/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要拉黑此用户吗？">拉黑</a>|
							<a href="{:U('Staff/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要启用此用户吗？">启用</a>
							<else/>
							<a style="color: #ccc;">拉黑</a>
						</neq>
					</td>
				</tr>
			</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>